package com.jlcloud.core.secure.provider;

import lombok.extern.slf4j.Slf4j;

/**
 * HttpMethod枚举类
 *
 * @author By: JlCloud <br>
 * @Package: com.jlcloud <br>
 * @CreateTime: 2024-12-03 21:45 <br>
 * @Copyright: 2021 www.jilianjituan.com Inc. All rights reserved. <br>
 * @Caution 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的 <br>
 */
@Slf4j
public enum HttpMethod {

	/**
	 * 请求方法集合
	 */
	GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE, ALL;

	/**
	 * 匹配枚举
	 */
	public static HttpMethod of(String method) {
		try {
			return valueOf(method);
		} catch (Exception exception) {
			log.error("HttpMethod of Exception: ", exception);
			return null;
		}
	}

}
